import Vue from 'vue'
import Router from 'vue-router'
import father from '@/components/father_son/father'
import son_father from '@/components/son_father/father'
import keepAlive from '../components/keep-alive/keepAlive.vue'
import safety from '../components/safety/safety.vue'
import restroute from '../components/restroute/rest.vue'
import frist from '../components/restroute/frist.vue'
import second from '../components/restroute/second.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: {
        name: 'safety'
      }
    },
    {
      path: "/father",
      name: "father",
      component: father
    },
    {
      path: '/son_father/father',
      name: "son_father",
      component: son_father
    },
    {
      path: '/keepAlive',
      name: "keepAlive",
      component: keepAlive
    },
    {
      path: "/safety",
      name: "safety",
      component: safety
    },
    {
      name: "restroute",
      path: "/restroute/frist",
      component: restroute,
      children: [
        {name: "frist", path: "/restroute/frist", component: frist},
        {name: "second", path: "/restroute/second", component: second}
      ]
    }
  ]
})
